package com.weiweiqin.service.impl;

import com.weiweiqin.dao.KjOrderCustomerDao;
import com.weiweiqin.model.KjOrderCustomer;
import com.weiweiqin.service.KjOrderCustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class KjOrderCustomerServiceImpl implements KjOrderCustomerService {
	@Autowired
	private KjOrderCustomerDao kjOrderCustomerDao;

	public void save(KjOrderCustomer colorSizeItem) {
		kjOrderCustomerDao.insert(colorSizeItem);
	}

	public KjOrderCustomer get(int id) {
		return kjOrderCustomerDao.get(id);
	}

	public List<KjOrderCustomer> getByOrderId(int orderId) {
		return kjOrderCustomerDao.getByOrderId(orderId);
	}

	public KjOrderCustomer getByOrderIdAndCustomerId(int orderId,int customerId) {
		return kjOrderCustomerDao.getByOrderIdAndCustomerId(orderId,customerId);
	}

}